package com.luisliuyi.demo.hook.ams;

import android.os.Build;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

public class AMSProxy implements InvocationHandler {
    private AmsHooker hooker; // 根据不同 Android 平台返回不同实现
    private Object origAm; // 原有 am 对象

    private boolean ensureInit() {
        // ...
        hooker = getHooker();
        origAm = hooker.getTarget();
        return true;
    }

    private AmsHooker getHooker() {
        if (Build.VERSION.SDK_INT > Build.VERSION_CODES.N_MR1) {
            return new AmsPHooker();
        }
        return null;
    }

        @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        return null;
    }
}
